<!-- 安全(设置安全码，设置登录密码，忘记登录密码) -->
<template>
  <div id="Install">
    <Head BackType1="1" title="安全"></Head>
    <div id="InstallMain">
      <div class="InstallBox BoxActive" v-for="(Title,index) in Titles" :key="index" @click="GotoDetails(index)">
        <div class="InstallBoxList">
          <div class="InstallTitle">{{Title}}</div>
          <img src="@/assets/img/ArrowRight.png" alt="">
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import Head from "../components/Head"
  import { Toast } from 'vant';
  export default {
    data(){
      return{
        Titles:['设置安全码','设置登录密码',]
      }
    },
    components:{
      Head,
      [Toast.name]:Toast
    },
    mounted(){
      let hasAmend = this.$route.params.hasAmend;
      let name = this.$route.params.name;
      console.log(hasAmend)
      if(hasAmend ==undefined){

      }else{
        Toast.success(name+'设置成功');

      }
    },
    methods:{
      GotoDetails(index){
        console.log(index)
        if(index == 0){  //设置安全码
          this.$router.push('/SetSecurityCode')
        }else if(index == 1){  //修改密码
          this.$router.push('/ChangePassword')
        }
        // else{ //忘记登录密码
        //   this.$router.push('/ForgotPassword')
        // }
      }
    }
  }
</script>

<style scoped lang="less">
#Install{
  font-size: 32px;
  #InstallMain{
    width: 750px;
    position: fixed;
    top: 88px;
    overflow: scroll;
    .InstallBox{
      padding-left: 30px;
      background: #fff;
      &:first-child{
        margin-top: 10px;
        margin-bottom: 20px;
        .InstallBoxList{
          border-bottom: 0;
        }
      }
      &:last-child{
        .InstallBoxList{
          border-bottom: 0;
        }
      }
      .InstallBoxList{
        border-bottom: 1px solid #e8e8e8;
        height: 90px;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
      }
      
      
      img{
        width: 14px;
        height: 22px;
        margin-right: 30px;
      }
    }
  }
}
</style>